package com.coldwindblows.blog.bo;

import java.util.List;

import com.coldwindblows.blog.pojo.CommentDo;

/**
 * 返回页面的评论，包含父子评论内容
 * Created by ColdWindBlows on 2018/07/01
 *
 */
public class CommentBo extends CommentDo {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private int levels;
	
	private List<CommentDo> children;
	
	public CommentBo(CommentDo comments) {
		this.setAuthor(comments.getAuthor());
		this.setMail(comments.getMail());
		this.setCoid(comments.getCoid());
		this.setAuthorId(comments.getAuthorId());
		this.setUrl(comments.getUrl());
		this.setCreated(comments.getCreated());
		this.setAgent(comments.getAgent());
		this.setIp(comments.getIp());
		this.setContent(comments.getContent());
		this.setOwnerId(comments.getOwnerId());
		this.setCid(comments.getCid());
	}

	public int getLevels() {
		return levels;
	}

	public void setLevels(int levels) {
		this.levels = levels;
	}

	public List<CommentDo> getChildren() {
		return children;
	}

	public void setChildren(List<CommentDo> children) {
		this.children = children;
	}

	@Override
	public String toString() {
		return "CommentBo [levels=" + levels + ", children=" + children + "]";
	}
	
}
